<template>
  <el-pagination
    @size-change="handleSizeChange"
    @current-change="handleCurrentChange"
    :current-page="quiryList.pagenum"
    :page-sizes="[3, 5, 10, 15]"
    :page-size="quiryList.pagesize"
    layout="total, sizes, prev, pager, next, jumper"
    :total="total"
  ></el-pagination>
</template>
<script>
export default {
    name:'pagination',
    props:['total'],
    data(){
        return {
              quiryList:{
                // 第几页
                pagenum:1,
                // 多少条
                pagesize:5
            }
        }
    },
    methods: {
        handleSizeChange(newsize){
            this.quiryList.pagesize = newsize
            this.$emit('handleSizeChange', this.quiryList.pagesize)
           
            
        },
        handleCurrentChange(newpage){
            this.quiryList.pagenum = newpage
             this.$emit('handleCurrentChange', this.quiryList.pagenum)
            
        }
    }
}
</script>
<style lang='css' scoped>
</style>